-
Notifications
You must be signed in to change notification settings - Fork 1.4k
17.7.1 merges #9022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
17.7.1 merges #9022
Conversation
…ms (dotnet#8870) Backport dotnet#8870 to vs17.7.
Fixes dotnet#8595 by storing the embedded-file zip in a temporary directory (instead of memory or binlog target directory) to avoid problems with file watchers.
In a recent profile of a graph construction, it was observed that a large amount of boxing was happening for ProjectElementSiblingEnumerable. This change simplifies how xml children are enumerated by adding an internal ChildrenEnumerable property which directly exposes the ProjectElementSiblingEnumerable which should avoid boxing, at least in some code paths (the public API makes it hard to avoid everywhere...). Additionally, a very common usage of enumerating children was to do Children.OfType<T> and wrap it in a ReadOnlyCollection<T>, so I introduced a GetChildrenOfType (and GetChildrenReversedOfType) method which exposes an ICollection<T> which does the same thing but without the boxing of ProjectElementSiblingEnumerable and without the OfType class. It's just 1 collection allocation.
Currently we turn off dynamic platform resolution for a whole solution if a single project in the solution is assigned a configuration. This is problematic as some projects are outside of the scope of the solution but still have certain targets that run on them that are architecture specific. These projects will build as the wrong architecture because no configuration is defined and no platform negotiation takes place. I removed the conditional that turns platform negotiation off on a sln level. The logic to turn this off on a project level is already in place through checking is a projectreference has setplatform appended to it. This will make sure no projects with configurations defined will be negotiated for as MSbuild adds setplatform metadata to projectreferences with configurations.
…-enumeration', 'backport/pr-8870-to-vs17.7' and 'dev/michaelshea/sln' into vs17.7
|
Hello! I noticed that you're targeting one of our servicing branches. Please consider updating the version. |
| using var redirection = RedirectWritesToOriginalWriter(); | ||
|
|
||
| Write(kind); | ||
| Write(stream.Length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that stream.Length is long while the original code was writing down int. These are serialized differently and thus this breaks the binary format:
private void Write(int value)
{
BinaryWriterExtensions.Write7BitEncodedInt(binaryWriter, value);
}
private void Write(long value)
{
binaryWriter.Write(value);
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad design on my part, should have named the overloads differently. Thanks so much for spotting this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original BinaryWriter also utilizes a lot of overloads. Your design just follows that, but it's easy to miss this type of bug.
Combination of #8971, #8885, #8847, and #8978.